package com.jiuli_travel.blog_service.service;

import com.jiuli_travel.blog_service.model.dto.team.JoinTeamRequest;
import com.jiuli_travel.blog_service.model.dto.team.CategorySearchTeamRequest;
import com.jiuli_travel.blog_service.model.dto.team.TeamInsertRequest;
import com.jiuli_travel.blog_service.model.entity.Team;
import com.baomidou.mybatisplus.extension.service.IService;
import com.jiuli_travel.blog_service.model.vo.TeamVO;
import com.jiuli_travel.utils.Result;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author jiuli
 * @since 2024-04-11
 */
public interface ITeamService extends IService<Team> {

    /**
     * 发起团队
     *
     * @param teamInsertRequest 团队传入的参数
     */
    Result publishTeam(TeamInsertRequest teamInsertRequest);

    /**
     * 加入团队
     */
    Result joinTeam(JoinTeamRequest joinTeamRequest);

    /**
     * 分类标签搜索团队
     * @param searchTeamRequest 分类标签搜索参数
     */
    void categorySearchTeam(CategorySearchTeamRequest searchTeamRequest);

    /**
     * 搜索框搜索团队
     *
     * @param searchText 搜索文本
     */
    List<TeamVO> searchTeam(String searchText, Integer size);


    /**
     *  解散团队
     * @param teamId 团队id
     */
    void disbandTeam(Long teamId);


    /**
     * 踢出团队
     */
    void kickOutOfTheTeam(Long teamId, Long userId);

    /**
     * 退出团队
     */
    void leaveTeam(Long teamId);

    public void leaveTeamP(Long teamId, Long userId);
}







